/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.rec.be;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "REC_ACTA_VENTA")
@NamedQueries({@NamedQuery(name = "ActaVenta.findAll", query = "SELECT a FROM ActaVenta a"), @NamedQuery(name = "ActaVenta.findByIdActaVenta", query = "SELECT a FROM ActaVenta a WHERE a.idActaVenta = :idActaVenta"), @NamedQuery(name = "ActaVenta.findByNroActa", query = "SELECT a FROM ActaVenta a WHERE a.nroActa = :nroActa"), @NamedQuery(name = "ActaVenta.findByFechaVenta", query = "SELECT a FROM ActaVenta a WHERE a.fechaVenta = :fechaVenta"), @NamedQuery(name = "ActaVenta.findByModoVenta", query = "SELECT a FROM ActaVenta a WHERE a.modoVenta = :modoVenta"), @NamedQuery(name = "ActaVenta.findByAnotacion", query = "SELECT a FROM ActaVenta a WHERE a.anotacion = :anotacion"), @NamedQuery(name = "ActaVenta.findByMoneda", query = "SELECT a FROM ActaVenta a WHERE a.moneda = :moneda"), @NamedQuery(name = "ActaVenta.findByMontoVenta", query = "SELECT a FROM ActaVenta a WHERE a.montoVenta = :montoVenta"), @NamedQuery(name = "ActaVenta.findByComprador", query = "SELECT a FROM ActaVenta a WHERE a.comprador = :comprador")})
public class ActaVenta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_ACTA_VENTA")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idActaVenta;
    @Column(name = "NUM_ACTA")
    private String nroActa;
    @Column(name = "FECHA_VENTA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaVenta;
    @Column(name = "MODO_VENTA")
    private String modoVenta;
    @Column(name = "ANOTACION")
    private String anotacion;
    @Column(name = "MONEDA")
    private String moneda;
    @Column(name = "MONTO_VENTA")
    private Double montoVenta;
    @Column(name = "COMPRADOR")
    private String comprador;
    @JoinColumn(name = "FID_REC_AJUDICACION", referencedColumnName = "ID_ADJUDICACION")
    @ManyToOne
    private Adjudicacion fidRecAjudicacion;

    public ActaVenta() {
    }

    public ActaVenta(Long idActaVenta) {
        this.idActaVenta = idActaVenta;
    }

    public Long getIdActaVenta() {
        return idActaVenta;
    }

    public void setIdActaVenta(Long idActaVenta) {
        this.idActaVenta = idActaVenta;
    }

    public String getNroActa() {
        return nroActa;
    }

    public void setNroActa(String nroActa) {
        this.nroActa = nroActa;
    }

    public Date getFechaVenta() {
        return fechaVenta;
    }

    public void setFechaVenta(Date fechaVenta) {
        this.fechaVenta = fechaVenta;
    }

    public String getModoVenta() {
        return modoVenta;
    }

    public void setModoVenta(String modoVenta) {
        this.modoVenta = modoVenta;
    }

    public String getAnotacion() {
        return anotacion;
    }

    public void setAnotacion(String anotacion) {
        this.anotacion = anotacion;
    }

    public String getMoneda() {
        return moneda;
    }

    public void setMoneda(String moneda) {
        this.moneda = moneda;
    }

    public Double getMontoVenta() {
        return montoVenta;
    }

    public void setMontoVenta(Double montoVenta) {
        this.montoVenta = montoVenta;
    }

    public String getComprador() {
        return comprador;
    }

    public void setComprador(String comprador) {
        this.comprador = comprador;
    }

    public Adjudicacion getFidRecAjudicacion() {
        return fidRecAjudicacion;
    }

    public void setFidRecAjudicacion(Adjudicacion fidRecAjudicacion) {
        this.fidRecAjudicacion = fidRecAjudicacion;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ActaVenta other = (ActaVenta) obj;
        if (this.idActaVenta != other.idActaVenta && (this.idActaVenta == null || !this.idActaVenta.equals(other.idActaVenta))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 29 * hash + (this.idActaVenta != null ? this.idActaVenta.hashCode() : 0);
        return hash;
    }

 

    @Override
    public String toString() {
        return "edu.upn.sigemfi.rec.be.ActaVenta[idActaVenta=" + idActaVenta + "]";
    }

}
